<%-- 
    Document   : reservas
    Created on : 01/05/2014, 23:29:44
    Author     : Felipe
--%>

<%@page import="br.com.modelo.ReservaBean"%>
<%@page import="java.util.List"%>
<%@page import="java.util.List"%>
<%@page import="br.com.dao.ReservaDAO"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Hotel Star - Reservas</title>
        <link rel="stylesheet" type="text/css" href="css/estilo.css">
    </head>
    <body>
        <div id="interface">
            <%@ include file="cabeçalho.jsp" %>
            <section id="corpo">

                
                        <a href="reservasCadastra.jsp">Nova Reserva</a>
                        <table border="1"  id="h">
                            <tr>   <td>NOME</td><td>QUARTO</td>
                            <td>DT.INICIO</td><td>DT.FIM</td><td>OPÇÃO</TD>
                            </tr>
                            <%
                            
                            ReservaDAO dao = new ReservaDAO();
                            List<ReservaBean> reservas = dao.getLista();
                            
                            for(ReservaBean reserva:reservas){
                               
                                String nmh =reserva.getNm_hospede();
                                String nmq=reserva.getNm_quarto();
                                String dti = reserva.getDt_inicio_reserva();                                
                                String dtf=reserva.getDt_fim_reserva();
                               
                                
                                %>
                                <tr>
                                     <td><%= nmh%></td>
                                     <td><%= nmq%></td>
                                      <td><%= dti %></td>
                                        <td><%= dtf %></td>
                                    
                                      <td><a href="reservasAltera.jsp?nmh=<%=nmh %>&nmq=<%= nmq %>&dti=<%=dti  %>&dtf=<%=dtf %>">Alterar</a>
                                          &nbsp;<a href="reservasExclui.jsp?nmh=<%=nmh %>&nmq=<%= nmq %>&dti=<%=dti  %>&dtf=<%=dtf %>">Remover</a></td>
                                </tr>
                                
                                
                                <% 
                            }                       
                              %>
                        </table>


               











                
            </section>


            <footer id="rodape">
                <p>Copyright &copy; 2014 - by Techsmart</p>


            </footer>
        </div>
    </body>
</html>
